<template>
  <div>
    <el-button type="text" @click="toBack">返回</el-button>
    {{ ProdauctData }}
    <el-card :body-style="{ width: '400px' }" shadow="hover ">
      <div style="padding: 14px">
        <div>产品名称: {{ ProdauctData.telephone }}</div>
        <div>产品价格: {{ ProdauctData.price }}</div>
        <div>产品描述: {{ ProdauctData.description }}</div>
        <div>产品图片: 
            <img src="" alt="">
        </div>
      </div>
    </el-card>
  </div>
</template>

<script>
import { mapActions, mapState } from "vuex";
export default {
  data() {
    return {
      id: this.$route.params.id,
    };
  },
  computed: {
    ...mapState("product", ["ProdauctData"]),
  },
  methods: {
    ...mapActions("product", ["findProductById"]),
    toBack() {
      this.$router.go(-1);
    },
  },
  created() {
    this.findProductById({ id: this.id });
  },
  mounted() {},
};
</script>
<style lang="less" scoped>
</style>